﻿<local:DocumentBase x:Class="WPFExcelReport.DSTDNVR"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:DSTDNVR"
                    Height="700" Width="1024" Background="White"
                    Title="DSTDNVR"  
                    >
    <local:DocumentBase.Resources>
        <db:SETVV  x:Key="SETUI" />
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="200" />
            <RowDefinition Height="500" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="2" Margin="0,0,0,165" Grid.RowSpan="2">
            <WrapPanel Name="ZoneOrder">
                <Label Content="发货日期从" Height="26" HorizontalAlignment="Left" Margin="10,0,0,0" Name="label1" VerticalAlignment="Top" Width="93" FontSize="18" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="FROM_SHIPPING_DATE" VerticalAlignment="Top" 
                                SelectedDateChanged ="FROM_SHIPPING_DATE_SelectedDateChanged" Width="95" />
                <Label Content="至" Height="28" HorizontalAlignment="Left" Margin="10,0,0,0" Name="label2" VerticalAlignment="Top" Width="19" FontSize="18" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="END_SHIPPING_DATE" VerticalAlignment="Top" 
                                SelectedDateChanged ="END_SHIPPING_DATE_SelectedDateChanged" Width="95" />
                <Button  Height="30"  Width="30" Margin="10,0,0,0" Name="btnGetDNVR" Click="btnGetDNVR_Click"  KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="10">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Search.png" />
                    </Button.Background>
                </Button>
                <Button   Height="30" Margin="20,0,0,0"  Name="btnPrintPreview" Width="30" Click="btnPrintPreview_Click">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/Print.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
            <WrapPanel Height="33">
                <Label Content="销售单："    Width="73" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtSO" Width="114" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="" Foreground="#FF1D1A1A" TabIndex="2" MaxLength="12" CharacterCasing="Upper"/>
                <Label Content="业务经理："    Width="87" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtMAN" Width="83" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="" Foreground="#FF1D1A1A" TabIndex="3" MaxLength="8" CharacterCasing="Upper"/>
                <Label Content="客户："    Width="54" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtCUSTOMER" Width="97" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="" Foreground="#FF1D1A1A" TabIndex="4" MaxLength="10" />
                <Label Content="内外销："    Width="73" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtEXP" Width="44" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="" Foreground="#FF1D1A1A" TabIndex="5" MaxLength="3" CharacterCasing="Upper" />
                <Label Content="跟单员："    Width="78" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF1D1A1A" />
                <TextBox Name="txtUSER" Width="46" Margin="0,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" Text="" Foreground="#FF1D1A1A" TabIndex="6" MaxLength="3" CharacterCasing="Upper" />
                
            </WrapPanel>
            <WrapPanel Name="ZoneFTP"
                   Visibility="Hidden">
                <CheckBox FontSize="14"
                      Content="属于管理员"
                      Name="IsBelongs2Admin"></CheckBox>
                <TextBlock FontSize="14"
                       MinWidth="200"
                       Width="Auto"
                       Name="Administration"
                       Background="#FF00AF00"></TextBlock>
                <TextBlock>FTP站点:</TextBlock>
                <TextBox Name="txtFTPSite"
                     Width="Auto"
                     TabIndex="6">192.168.1.102</TextBox>
                <TextBox Name="txtFTPPort"
                     Width="Auto"
                     TabIndex="7">21</TextBox>
                <Label Content="用户名"
                   Width="60"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
                <TextBox Name="txtFTPUser"
                     Width="80"
                     Margin="10,0,0,0"
                     Text="sun"
                     HorizontalAlignment="Left"
                     Background="Yellow"
                     FontSize="18"
                     MaxLength="8"
                     AcceptsTab="False"
                     CharacterCasing="Upper"
                     KeyboardNavigation.TabIndex="0"
                     TabIndex="8" />
                <Label Content="密码"
                   Width="40"
                   Margin="10,0,0,0"
                   HorizontalAlignment="Left"
                   FontSize="18"
                   VerticalAlignment="Center" />
                <PasswordBox Name="txtFTPPwd"
                         Width="80"
                         Margin="10,0,0,0"
                         HorizontalAlignment="Left"
                         Background="Yellow"
                         FontSize="18"
                         KeyboardNavigation.TabIndex="1"
                         TabIndex="9" />
                <Button Height="Auto"
                    Margin="10,0,0,0"
                    Name="btnLogFTP"
                    Width="34"
                    Click="btnLogFTP_Click"
                    KeyboardNavigation.TabIndex="2"
                    IsDefault="True"
                    TabIndex="10">
                    <Button.Background>
                        <ImageBrush ImageSource="/IntexReportClient;component/Images/User.png" />
                    </Button.Background>
                </Button>
            </WrapPanel>
            </StackPanel>
        <StackPanel  Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2" Margin="0,30,3,0">
            <fd:FilteringDataGrid
            CanUserReorderColumns="True"  
            CanUserResizeRows="True" 
            CanUserSortColumns="True"
            IsFilteringCaseSensitive="False"
            AutoGenerateColumns="False"  
            EnableRowVirtualization="True"  
            RowDetailsVisibilityMode="VisibleWhenSelected"
            HorizontalAlignment="Stretch" 
            VerticalAlignment="Stretch"
            IsSynchronizedWithCurrentItem="True" 
            Opacity="10" 
            Visibility="Visible"
            MaxHeight="600"
            MaxWidth="900"
            VerticalScrollBarVisibility="Auto"
            HorizontalScrollBarVisibility="Auto"
            ItemsSource="{Binding}" 
            Margin="0,2,0,0" 
            x:Name="dlgDNVR" >
                <DataGrid.Columns>
                    <!--C.VKPKUNDNR,K.KDKUNDNA,C.VKPSACHBE, NAME, C.VKPVG,E.VGDES,T.VRKRENR,T.VRPREPOS,T.VRKREART,T.VRKREDAT "
                    + " CO,art,color,CSART, COQTY, DEQTY,C.VKPMEEH, COPR,C.VKPPREH,C.VKPHWAEHRSL, "
                    + " COVALUE,T.INVQTY,T.VRPMEEH,T.INVPR,T.VRPPREH,T.VRPWAEHRSL,T.VALUE,T.SURCHARGE1,T.SURCHARGE2,T.SURCHARGE3, "
                    + " '' AS ARTBEM, '' AS SHIPDAT,T.VRPBUSIMODE,T.PAY,'' AS INVBEM, "
                    + " '' AS REMARK1,'' AS REMARK2,'' AS REMARK3,'' AS REMARK4,'' AS REMARK5, "
                    + " '' AS REMARK6,'' AS REMARK7,'' AS REMARK8,'' AS REMARK9,'' AS REMARK10-->
                    <DataGridTextColumn Binding="{Binding Path=VKPKUNDNR}" Header="客户编号"  Width="SizeToCells" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=KDKUNDNA}" Header="客户" Width="SizeToCells"  MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=NAME}" Header="负责人" Width="SizeToCells" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VGDES}" Header="跟单员" Width="SizeToCells" MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VRKREART}" Header="发票类型" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=VRKRENR}" Header="发票编号" Width="SizeToCells" MinWidth="50" />
                    <DataGridTextColumn Binding="{Binding Path=VRPREPOS}" Header="发票行" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=VRKREDAT}" Header="开票日期"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=VRPBUSIMODE}" Header="开清状态" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=PAY}" Header="付款" Width="SizeToCells" MinWidth="30" />
                    <DataGridTextColumn Binding="{Binding Path=CSART}" Header="客户品种" Width="SizeToCells" MinWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=CO}" Header="销售单号" Width="SizeToCells" MinWidth="50"/>
                    <DataGridTextColumn Binding="{Binding Path=ARTBEM}" Header="规格" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="销售品种" Width="SizeToCells" MinWidth="40" />
                    <DataGridTextColumn Binding="{Binding Path=VKPFARBE}" Header="品种颜色"  Width="SizeToCells"   MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=COQTY}" Header="合同数"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPMEEH}" Header="单位"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=COPR}" Header="单价"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPPREH}" Header="单位"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=VKPHWAEHRSL}" Header="合同货币"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=DEQTY}" Header="走货总数"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=SHIPDAT}" Header="最后走货日期"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=COVALUE}" Header="销售金额"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=INVQTY}" Header="开票数量"   Width="SizeToCells"   MinWidth="40"/>
                    <DataGridTextColumn Binding="{Binding Path=VRPMEEH}" Header="单位"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=INVPR}" Header="单价"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=VRPPREH}" Header="单位"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=VRPWAEHRSL}" Header="开票货币"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=SURCHARGE1}" Header="费用1"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=SURCHARGE2}" Header="费用2"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=SURCHARGE3}" Header="费用3"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=VALUE}" Header="开票金额"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=INVBEM}" Header="头备注"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=REMARK}" Header="行备注"  Width="SizeToCells" MinWidth="30"/>
                    <!--DataGridTextColumn Binding="{Binding Path=REMARK1}" Header="行备注1"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=REMARK2}" Header="行备注2"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=REMARK3}" Header="行备注3"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=REMARK4}" Header="行备注4"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=REMARK5}" Header="行备注5"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=REMARK6}" Header="行备注6"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=REMARK7}" Header="行备注7"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=REMARK8}" Header="行备注8"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=REMARK9}" Header="行备注9"  Width="SizeToCells" MinWidth="30"/>
                    <DataGridTextColumn Binding="{Binding Path=REMARK10}" Header="行备注10"  Width="SizeToCells" MinWidth="30"/-->
                </DataGrid.Columns>
            </fd:FilteringDataGrid  >
        </StackPanel>
    </Grid>
</local:DocumentBase>